home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 144_01 / search.hlp < prev    next >
Text File  |  1985-08-19  |  3KB  |  58 lines

  1. **********************************************************************
  2. *                             SEARCH                                 *
  3. **********************************************************************
  4. *                  COPYRIGHT 1983 EUGENE H. MALLORY                  *
  5. **********************************************************************
  6. PROGRAM:
  7.     SEARCH - Search files for lines containing a pattern.
  8. USAGE:
  9.     SEARCH [<fid] pattern afn [-X] [-L] [-N] [-H] [>fid]
  10. FUNCTION:
  11.     This searches files for lines containing the supplied pattern and 
  12.     outputs the selected lines. The default is to output file names
  13.     of files which contain the pattern.  Other selection options are:
  14.     -X    Suppress listing of the file names
  15.     -L    List lines containing the pattern.
  16.     -N  Output found lines with their line number.
  17.     -H  Display the available options and metacharacters.
  18.     
  19.     All files defined by the afn are searched.  If input is also
  20.     from a file (<fname), file names are taken from the input file.
  21.     
  22.     The pattern is very general.  There are the following options.
  23.     *    Any number of any characters, from 0 to 132.
  24.     ?    Any single character.
  25.     _    A space character.
  26.     \    Literal character.  Used to include *, ? etc. in pattern.
  27.     {    Beginning of line.
  28.     }    End of line.
  29.     @    Any alphabetic character.
  30.     #    Any number.
  31.     !    NOT  This may be used with any printable character, _,
  32.         {, }, @, and #, as well as \char forms.  This can be used 
  33.         to find    strings NOT at the beginnnin# or end of a line.
  34. EXAMPLE:
  35.     SEARCH FILE *.C |SEARCH FCLOSE {Finds all C programs with the 
  36.                         words FILE and FCLOSE}
  37.     SEARCH JOHN_SMITH *.TXT {Finds all text files with John Smith}
  38.     SEARCH NASA *.TXT -ln   {Finds and displays all text lines
  39.                           contini## the word NASA}
  40.     SEARCH LABEL BIOS*.ASM  {Finds LABEL in a series of assembly files}
  41. COMMENTS:
  42.     Because CP/M CCP converts all arguments to uppercase,
  43.     this program does all its compares in uppercase.  "abc" will
  44.     match "ABC" in all cases.
  45.  
  46.         Command Line                       
  47. ___________________________________  
  48.                                   |  
  49.                                   |  PATTERN, FILE NAMES, OPTIONS
  50.                                   |                  
  51.                     ______________V______________    
  52.  Standard Input     |                           |   Standard Output
  53.    FILE NAMES       |                           | FILE NAMES/TEXT LINES
  54. ------------------->|          SEARCH           |----------------------->
  55.                     |                           |
  56.                     |                           |
  57.                     |___________________________|
  58.